package ex_10_innerTest;

/**
 * =========================
 * 静态内置类;使用 new Inner(); 方式直接实例化
 * =========================
 */
public class StaticClass {
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    static class Inner{
        private String age;
        private String address;

        public String getAge() {
            return age;
        }

        public void setAge(String age) {
            this.age = age;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }
    }

    public static void main(String[] args) {
        StaticClass publicClass = new StaticClass();
        publicClass.setName("amy");
        System.out.println(publicClass.getName());
        Inner inner = new Inner();
        inner.setAge("19");
        inner.setAddress("china");
        System.out.println(inner.getAge() + " " + inner.getAddress());
    }
}
